Figure 18. Classes in a Web Application with a Java Client
To support distributing the application across the server and clients, the distribution layer is inserted. There's a server side and a client side to the distribution layer. The server side, provided by the EOJavaClient framework, is written in Objective-C. The client side, provided by the com.apple.client.eodistribution package, is written in Java. Together, the two sides of the distribution layer handle the communication between the application server and the user's Java client.
The EODistributionContext class encodes data to send to the client and decodes data it receives from the client. Additionally, it keeps track of state necessary to keep the client and server in sync.
EODistributedObjectStore is a concrete subclass of the control layer's abstract EOObjectStore class. It merely incorporates knowledge of the distribution layer's channel so it can forward messages it receives from the server to its editing context as well as messages going the other way.
EODistributedDataSource is a concrete subclass of the control layer's abstract EODataSource class. Whereas the access layer's EODatabaseDataSource fetches using an EODatabaseContext, an EODistributedDataSource fetches using an editing context (which in turn, forward the fetch request to the server where the request is ultimately serviced by an EODatabaseContext).
On the server side, you can write your application in either Objective-C or Java. The Java APIs (com.apple.yellow.eoaccess, com.apple.yellow.eocontrol, and com.apple.yellow.eointerface) are actually wrappers for the corresponding Objective-C frameworks. When you invoke a Java method from one of the com.apple.yellow packages, the message is forwarded across Apple's Java bridge to a corresponding Objective-C object. On the client side, however, the APIs (com.apple.client.eocontrol, com.apple.client.eodistribution, and com.apple.client.eointerface) are implemented in pure Java.
Note: In the client, you don't have the option of writing Objective-C code.
Conceptually, the classes in com.apple.yellow and com.apple.client are the same and generally their APIs are identical. However, there are some differences, the most significant of which are that:
Table of Contents
Next Section